3.1561 \(\int \frac{(g \cos (e+f x))^p}{(a+b \sin (e+f x)) (c+d \sin (e+f x))} \, dx\)

Optimal. Leaf size=330 \[ \frac{g (g \cos (e+f x))^{p-1} \left (-\frac{d (1-\sin (e+f x))}{c+d \sin (e+f x)}\right )^{\frac{1-p}{2}} \left (\frac{d (\sin (e+f x)+1)}{c+d \sin (e+f x)}\right )^{\frac{1-p}{2}} F_1\left (1-p;\frac{1-p}{2},\frac{1-p}{2};2-p;\frac{c+d}{c+d \sin (e+f x)},\frac{c-d}{c+d \sin (e+f x)}\right )}{f (1-p) (b c-a d)}-\frac{g (g \cos (e+f x))^{p-1} \left (-\frac{b (1-\sin (e+f x))}{a+b \sin (e+f x)}\right )^{\frac{1-p}{2}} \left (\frac{b (\sin (e+f x)+1)}{a+b \sin (e+f x)}\right )^{\frac{1-p}{2}} F_1\left (1-p;\frac{1-p}{2},\frac{1-p}{2};2-p;\frac{a+b}{a+b \sin (e+f x)},\frac{a-b}{a+b \sin (e+f x)}\right )}{f (1-p) (b c-a d)} \]

[Out]

-((g*AppellF1[1 - p, (1 - p)/2, (1 - p)/2, 2 - p, (a + b)/(a + b*Sin[e + f*x]), (a - b)/(a + b*Sin[e + f*x])]*
(g*Cos[e + f*x])^(-1 + p)*(-((b*(1 - Sin[e + f*x]))/(a + b*Sin[e + f*x])))^((1 - p)/2)*((b*(1 + Sin[e + f*x]))
/(a + b*Sin[e + f*x]))^((1 - p)/2))/((b*c - a*d)*f*(1 - p))) + (g*AppellF1[1 - p, (1 - p)/2, (1 - p)/2, 2 - p,
 (c + d)/(c + d*Sin[e + f*x]), (c - d)/(c + d*Sin[e + f*x])]*(g*Cos[e + f*x])^(-1 + p)*(-((d*(1 - Sin[e + f*x]
))/(c + d*Sin[e + f*x])))^((1 - p)/2)*((d*(1 + Sin[e + f*x]))/(c + d*Sin[e + f*x]))^((1 - p)/2))/((b*c - a*d)*
f*(1 - p))

________________________________________________________________________________________

Rubi [A]  time = 0.415848, antiderivative size = 330, normalized size of antiderivative = 1., number of steps used = 4, number of rules used = 2, integrand size = 35, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.057, Rules used = {2924, 2703} \[ \frac{g (g \cos (e+f x))^{p-1} \left (-\frac{d (1-\sin (e+f x))}{c+d \sin (e+f x)}\right )^{\frac{1-p}{2}} \left (\frac{d (\sin (e+f x)+1)}{c+d \sin (e+f x)}\right )^{\frac{1-p}{2}} F_1\left (1-p;\frac{1-p}{2},\frac{1-p}{2};2-p;\frac{c+d}{c+d \sin (e+f x)},\frac{c-d}{c+d \sin (e+f x)}\right )}{f (1-p) (b c-a d)}-\frac{g (g \cos (e+f x))^{p-1} \left (-\frac{b (1-\sin (e+f x))}{a+b \sin (e+f x)}\right )^{\frac{1-p}{2}} \left (\frac{b (\sin (e+f x)+1)}{a+b \sin (e+f x)}\right )^{\frac{1-p}{2}} F_1\left (1-p;\frac{1-p}{2},\frac{1-p}{2};2-p;\frac{a+b}{a+b \sin (e+f x)},\frac{a-b}{a+b \sin (e+f x)}\right )}{f (1-p) (b c-a d)} \]

Antiderivative was successfully verified.

[In]

Int[(g*Cos[e + f*x])^p/((a + b*Sin[e + f*x])*(c + d*Sin[e + f*x])),x]

[Out]

-((g*AppellF1[1 - p, (1 - p)/2, (1 - p)/2, 2 - p, (a + b)/(a + b*Sin[e + f*x]), (a - b)/(a + b*Sin[e + f*x])]*
(g*Cos[e + f*x])^(-1 + p)*(-((b*(1 - Sin[e + f*x]))/(a + b*Sin[e + f*x])))^((1 - p)/2)*((b*(1 + Sin[e + f*x]))
/(a + b*Sin[e + f*x]))^((1 - p)/2))/((b*c - a*d)*f*(1 - p))) + (g*AppellF1[1 - p, (1 - p)/2, (1 - p)/2, 2 - p,
 (c + d)/(c + d*Sin[e + f*x]), (c - d)/(c + d*Sin[e + f*x])]*(g*Cos[e + f*x])^(-1 + p)*(-((d*(1 - Sin[e + f*x]
))/(c + d*Sin[e + f*x])))^((1 - p)/2)*((d*(1 + Sin[e + f*x]))/(c + d*Sin[e + f*x]))^((1 - p)/2))/((b*c - a*d)*
f*(1 - p))

Rule 2924

Int[(cos[(e_.) + (f_.)*(x_)]*(g_.))^(p_)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_)*((c_) + (d_.)*sin[(e_.) +
 (f_.)*(x_)])^(n_), x_Symbol] :> Int[ExpandTrig[(g*cos[e + f*x])^p*(a + b*sin[e + f*x])^m*(c + d*sin[e + f*x])
^n, x], x] /; FreeQ[{a, b, c, d, e, f, g, p}, x] && NeQ[a^2 - b^2, 0] && IntegersQ[2*m, 2*n]

Rule 2703

Int[(cos[(e_.) + (f_.)*(x_)]*(g_.))^(p_)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_), x_Symbol] :> Simp[(g*(g*
Cos[e + f*x])^(p - 1)*(a + b*Sin[e + f*x])^(m + 1)*AppellF1[-p - m, (1 - p)/2, (1 - p)/2, 1 - p - m, (a + b)/(
a + b*Sin[e + f*x]), (a - b)/(a + b*Sin[e + f*x])])/(b*f*(m + p)*(-((b*(1 - Sin[e + f*x]))/(a + b*Sin[e + f*x]
)))^((p - 1)/2)*((b*(1 + Sin[e + f*x]))/(a + b*Sin[e + f*x]))^((p - 1)/2)), x] /; FreeQ[{a, b, e, f, g, p}, x]
 && NeQ[a^2 - b^2, 0] && ILtQ[m, 0] &&  !IGtQ[m + p + 1, 0]

Rubi steps

\begin{align*} \int \frac{(g \cos (e+f x))^p}{(a+b \sin (e+f x)) (c+d \sin (e+f x))} \, dx &=\int \left (\frac{b (g \cos (e+f x))^p}{(b c-a d) (a+b \sin (e+f x))}-\frac{d (g \cos (e+f x))^p}{(b c-a d) (c+d \sin (e+f x))}\right ) \, dx\\ &=\frac{b \int \frac{(g \cos (e+f x))^p}{a+b \sin (e+f x)} \, dx}{b c-a d}-\frac{d \int \frac{(g \cos (e+f x))^p}{c+d \sin (e+f x)} \, dx}{b c-a d}\\ &=-\frac{g F_1\left (1-p;\frac{1-p}{2},\frac{1-p}{2};2-p;\frac{a+b}{a+b \sin (e+f x)},\frac{a-b}{a+b \sin (e+f x)}\right ) (g \cos (e+f x))^{-1+p} \left (-\frac{b (1-\sin (e+f x))}{a+b \sin (e+f x)}\right )^{\frac{1-p}{2}} \left (\frac{b (1+\sin (e+f x))}{a+b \sin (e+f x)}\right )^{\frac{1-p}{2}}}{(b c-a d) f (1-p)}+\frac{g F_1\left (1-p;\frac{1-p}{2},\frac{1-p}{2};2-p;\frac{c+d}{c+d \sin (e+f x)},\frac{c-d}{c+d \sin (e+f x)}\right ) (g \cos (e+f x))^{-1+p} \left (-\frac{d (1-\sin (e+f x))}{c+d \sin (e+f x)}\right )^{\frac{1-p}{2}} \left (\frac{d (1+\sin (e+f x))}{c+d \sin (e+f x)}\right )^{\frac{1-p}{2}}}{(b c-a d) f (1-p)}\\ \end{align*}

Mathematica [B]  time = 34.3345, size = 5087, normalized size = 15.42 \[ \text{Result too large to show} \]

Warning: Unable to verify antiderivative.

[In]

Integrate[(g*Cos[e + f*x])^p/((a + b*Sin[e + f*x])*(c + d*Sin[e + f*x])),x]

[Out]

Result too large to show

________________________________________________________________________________________

Maple [F]  time = 0.72, size = 0, normalized size = 0. \begin{align*} \int{\frac{ \left ( g\cos \left ( fx+e \right ) \right ) ^{p}}{ \left ( a+b\sin \left ( fx+e \right ) \right ) \left ( c+d\sin \left ( fx+e \right ) \right ) }}\, dx \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((g*cos(f*x+e))^p/(a+b*sin(f*x+e))/(c+d*sin(f*x+e)),x)

[Out]

int((g*cos(f*x+e))^p/(a+b*sin(f*x+e))/(c+d*sin(f*x+e)),x)

________________________________________________________________________________________

Maxima [F(-1)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((g*cos(f*x+e))^p/(a+b*sin(f*x+e))/(c+d*sin(f*x+e)),x, algorithm="maxima")

[Out]

Timed out

________________________________________________________________________________________

Fricas [F]  time = 0., size = 0, normalized size = 0. \begin{align*}{\rm integral}\left (-\frac{\left (g \cos \left (f x + e\right )\right )^{p}}{b d \cos \left (f x + e\right )^{2} - a c - b d -{\left (b c + a d\right )} \sin \left (f x + e\right )}, x\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((g*cos(f*x+e))^p/(a+b*sin(f*x+e))/(c+d*sin(f*x+e)),x, algorithm="fricas")

[Out]

integral(-(g*cos(f*x + e))^p/(b*d*cos(f*x + e)^2 - a*c - b*d - (b*c + a*d)*sin(f*x + e)), x)

________________________________________________________________________________________

Sympy [F(-1)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((g*cos(f*x+e))**p/(a+b*sin(f*x+e))/(c+d*sin(f*x+e)),x)

[Out]

Timed out

________________________________________________________________________________________

Giac [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{\left (g \cos \left (f x + e\right )\right )^{p}}{{\left (b \sin \left (f x + e\right ) + a\right )}{\left (d \sin \left (f x + e\right ) + c\right )}}\,{d x} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((g*cos(f*x+e))^p/(a+b*sin(f*x+e))/(c+d*sin(f*x+e)),x, algorithm="giac")

[Out]

integrate((g*cos(f*x + e))^p/((b*sin(f*x + e) + a)*(d*sin(f*x + e) + c)), x)